// apis/message.js
import request from '@/utils/request.js'

/**
 * 消息列表  
 * @property {string} contentType - 消息类型
 * @property {string} page - 消息数据对应的页码
 * @property {string} pageSize - 每页包含消息数据的条数
 */
export const listApi = (contentType, page = 1, pageSize = 10) => {
	//  默认写法：request({url, method, data/parmas})
	return request.get('/driver/messages/page', {
		contentType,
		page,
		pageSize
	})
}

/**
 *  @property {string} contentType - 消息类型
 */
export const readAllApi = (contentType) => {
	return request.put(`/driver/messages/readAll/${contentType}`)
}